﻿using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing.Design;

namespace ControlLibrary {
    [Designer("ControlLibrary.ComponentModel.LookupFieldDesigner, ControlLibrary.Design")]
    public partial class LookupField : UserControl {
        public LookupField() {
            InitializeComponent();
        }

        [Category("Data")]
        [Description("The Data Source")]
        [TypeConverter("System.Windows.Forms.Design.AdvancedBindingTypeConverter")]
        [Editor("System.Windows.Forms.Design.DataSourceListEditor", typeof(UITypeEditor))]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public object DataSource { get; set; }

        [Category("Data")]
        [Description("The Lookup Source")]
        [TypeConverter("System.Windows.Forms.Design.AdvancedBindingTypeConverter")]
        [Editor("System.Windows.Forms.Design.DataSourceListEditor", typeof(UITypeEditor))]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public object LookupSource { get; set; }

        [Category("Forms")]
        [Description("Choose the query form")]
        [Editor("ControlLibrary.ComponentModel.QueryEditor, ControlLibrary.Design", typeof(UITypeEditor))]
        public object FormQueryType { get; set; }

        [Category("Forms")]
        [Description("Choose the crud form")]
        [Editor("ControlLibrary.ComponentModel.CrudEditor, ControlLibrary.Design", typeof(UITypeEditor))]
        public object FormCrudType { get; set; }
    }
}